public class TestExtend {
    public static void main(String[] args) {
        Dog dog=new Dog();

        System.out.println(dog.name="旺财");
        System.out.println(dog.age=3);
        System.out.println(dog.color="黄色");
        dog.bark();
        dog.play();
        dog.eat();
        Cat cat=new Cat();
        System.out.println(cat.name="希宝");
        System.out.println(cat.age=1);
        System.out.println(cat.color="白色");
        cat.mew();
        cat.play();
        cat.eat();
    }
}
